package com.wwwarehouse.resource_center.bean.goods;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Joseph on 2017/9/20.
 *         <p/>
 */

public class GoodsSelectLabelBean implements Parcelable {

    /**
     * list : [{"createTime":"2017-09-27 19:56:49","labelUkid":10002183,"updateTime":"2017-09-27 19:56:49"},{"createTime":"2017-09-27 19:56:49","labelUkid":10002184,"updateTime":"2017-09-27 19:56:49"},{"createTime":"2018-08-25 00:00:00","createUserId":10001869,"labelName":"标签名1","labelType":"0","labelUkid":212121200002001,"ownerUkid":10001359,"updateTime":"2018-08-25 00:00:00","updateUserId":10001869},{"labelName":"测试不存在owner_ukid标签名","labelType":"0","labelUkid":212121200002002,"ownerUkid":1222},{"labelName":"已存在标签名","labelType":"1","labelUkid":212121200002003,"ownerUkid":10001336},{"createTime":"2018-08-25 00:00:00","createUserId":10001972000,"labelName":"测试标签周二","labelType":"0","labelUkid":212321200002001,"ownerUkid":1000135910,"updateTime":"2018-08-25 00:00:00","updateUserId":10001972000},{"createTime":"2017-08-28 13:42:23","createUserId":10001869,"labelName":"测试标签321423432","labelType":"0","labelUkid":221223324324325,"ownerUkid":11111122222,"updateTime":"2017-08-28 13:42:23","updateUserId":10001869},{"labelName":"测试标签周二","labelType":"0","labelUkid":2121212003002002,"ownerUkid":1222},{"labelName":"测试标签周二","labelType":"1","labelUkid":2121212300002003,"ownerUkid":1000135910},{"createTime":"2018-08-25 00:00:00","createUserId":10001869,"labelName":"标签名1","labelType":"0","labelUkid":22066900000002001,"ownerUkid":10001336,"updateTime":"2018-08-25 00:00:00","updateUserId":10001869},{"createTime":"2017-08-28 13:42:23","createUserId":10001869,"labelName":"标签名不为当前单位类型","labelType":"0","labelUkid":22066900000002003,"ownerUkid":1000135100,"updateTime":"2017-08-28 13:42:23","updateUserId":10001869},{"createTime":"2017-09-20 18:23:42","createUserId":10000001,"labelName":"你才能信那你想那你想","labelType":"0","labelUkid":22088000000007024,"ownerUkid":10001359,"updateTime":"2017-09-20 18:23:42","updateUserId":10000001},{"createTime":"2017-09-20 18:23:56","createUserId":10000001,"labelName":"你才能你才能","labelType":"0","labelUkid":22088000000007025,"ownerUkid":10001359,"updateTime":"2017-09-20 18:23:56","updateUserId":10000001},{"createTime":"2017-09-20 19:15:31","createUserId":10000001,"labelName":"dnxnn","labelType":"0","labelUkid":22088000000007028,"ownerUkid":10001359,"updateTime":"2017-09-20 19:15:31","updateUserId":10000001},{"createTime":"2017-09-20 19:28:48","createUserId":10000001,"labelName":"不行不行帮我","labelType":"0","labelUkid":22088000000007031,"ownerUkid":10001359,"updateTime":"2017-09-20 19:28:48","updateUserId":10000001},{"createTime":"2017-09-20 19:43:01","createUserId":10000001,"labelName":"那些年上课","labelType":"0","labelUkid":22088000000007034,"ownerUkid":10001359,"updateTime":"2017-09-20 19:43:01","updateUserId":10000001},{"createTime":"2017-09-20 18:22:32","createUserId":10000001,"labelName":"hjxnx","labelType":"0","labelUkid":22088400000008034,"ownerUkid":10001359,"updateTime":"2017-09-20 18:22:32","updateUserId":10000001},{"createTime":"2017-09-20 18:37:01","createUserId":10000001,"labelName":"hdhdhd","labelType":"0","labelUkid":22088400000008035,"ownerUkid":10001359,"updateTime":"2017-09-20 18:37:01","updateUserId":10000001},{"createTime":"2017-09-20 19:14:18","createUserId":10000001,"labelName":"ccc","labelType":"0","labelUkid":22088400000008039,"ownerUkid":10001359,"updateTime":"2017-09-20 19:14:18","updateUserId":10000001},{"createTime":"2017-09-20 19:14:44","createUserId":10000001,"labelName":"nxnxnx","labelType":"0","labelUkid":22088400000008040,"ownerUkid":10001359,"updateTime":"2017-09-20 19:14:44","updateUserId":10000001},{"createTime":"2017-09-20 19:15:43","createUserId":10000001,"labelName":"彼此睡觉","labelType":"0","labelUkid":22088400000008041,"ownerUkid":10001359,"updateTime":"2017-09-20 19:15:43","updateUserId":10000001},{"createTime":"2017-09-20 19:21:49","createUserId":10000001,"labelName":"好吃","labelType":"0","labelUkid":22088400000008042,"ownerUkid":10001359,"updateTime":"2017-09-20 19:21:49","updateUserId":10000001},{"createTime":"2017-09-20 19:30:04","createUserId":10000001,"labelName":"经常你猜","labelType":"0","labelUkid":22088400000008043,"ownerUkid":10001359,"updateTime":"2017-09-20 19:30:04","updateUserId":10000001},{"createTime":"2017-09-20 19:30:21","createUserId":10000001,"labelName":"那些你猜","labelType":"0","labelUkid":22088400000008044,"ownerUkid":10001359,"updateTime":"2017-09-20 19:30:21","updateUserId":10000001}]
     * page : 1
     * size : 24
     * total : 336
     */

    private int page;
    private int size;
    private int total;
    private List<ListBean> list;

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public List<ListBean> getList() {
        return list;
    }

    public void setList(List<ListBean> list) {
        this.list = list;
    }

    public static class ListBean implements Parcelable {
        /**
         * createTime : 2017-09-27 19:56:49
         * labelUkid : 10002183
         * updateTime : 2017-09-27 19:56:49
         * createUserId : 10001869
         * labelName : 标签名1
         * labelType : 0
         * ownerUkid : 10001359
         * updateUserId : 10001869
         */

        private String createTime="";
        private String labelUkid="";
        private String updateTime="";
        private String createUserId="";
        private String labelName="";
        private String labelType="";
        private String ownerUkid="";
        private String updateUserId="";
        private boolean isSelect = false ;

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;

            ListBean listBean = (ListBean) o;

            if (isSelect != listBean.isSelect) return false;
            if (!createTime.equals(listBean.createTime)) return false;
            if (!labelUkid.equals(listBean.labelUkid)) return false;
            if (!updateTime.equals(listBean.updateTime)) return false;
            if (!createUserId.equals(listBean.createUserId)) return false;
            if (!labelName.equals(listBean.labelName)) return false;
            if (!labelType.equals(listBean.labelType)) return false;
            if (!ownerUkid.equals(listBean.ownerUkid)) return false;
            return updateUserId.equals(listBean.updateUserId);

        }

        @Override
        public int hashCode() {
            int result = createTime.hashCode();
            result = 31 * result + labelUkid.hashCode();
            result = 31 * result + updateTime.hashCode();
            result = 31 * result + createUserId.hashCode();
            result = 31 * result + labelName.hashCode();
            result = 31 * result + labelType.hashCode();
            result = 31 * result + ownerUkid.hashCode();
            result = 31 * result + updateUserId.hashCode();
            result = 31 * result + (isSelect ? 1 : 0);
            return result;
        }

        public boolean isSelect() {
            return isSelect;
        }

        public void setSelect(boolean select) {
            isSelect = select;
        }

        public String getCreateTime() {
            return createTime;
        }

        public void setCreateTime(String createTime) {
            this.createTime = createTime;
        }

        public String getLabelUkid() {
            return labelUkid;
        }

        public void setLabelUkid(String labelUkid) {
            this.labelUkid = labelUkid;
        }

        public String getUpdateTime() {
            return updateTime;
        }

        public void setUpdateTime(String updateTime) {
            this.updateTime = updateTime;
        }

        public String getCreateUserId() {
            return createUserId;
        }

        public void setCreateUserId(String createUserId) {
            this.createUserId = createUserId;
        }

        public String getLabelName() {
            return labelName;
        }

        public void setLabelName(String labelName) {
            this.labelName = labelName;
        }

        public String getLabelType() {
            return labelType;
        }

        public void setLabelType(String labelType) {
            this.labelType = labelType;
        }

        public String getOwnerUkid() {
            return ownerUkid;
        }

        public void setOwnerUkid(String ownerUkid) {
            this.ownerUkid = ownerUkid;
        }

        public String getUpdateUserId() {
            return updateUserId;
        }

        public void setUpdateUserId(String updateUserId) {
            this.updateUserId = updateUserId;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.createTime);
            dest.writeString(this.labelUkid);
            dest.writeString(this.updateTime);
            dest.writeString(this.createUserId);
            dest.writeString(this.labelName);
            dest.writeString(this.labelType);
            dest.writeString(this.ownerUkid);
            dest.writeString(this.updateUserId);
            dest.writeByte(this.isSelect ? (byte) 1 : (byte) 0);
        }

        public ListBean() {
        }

        protected ListBean(Parcel in) {
            this.createTime = in.readString();
            this.labelUkid = in.readString();
            this.updateTime = in.readString();
            this.createUserId = in.readString();
            this.labelName = in.readString();
            this.labelType = in.readString();
            this.ownerUkid = in.readString();
            this.updateUserId = in.readString();
            this.isSelect = in.readByte() != 0;
        }

        public static final Creator<ListBean> CREATOR = new Creator<ListBean>() {
            @Override
            public ListBean createFromParcel(Parcel source) {
                return new ListBean(source);
            }

            @Override
            public ListBean[] newArray(int size) {
                return new ListBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.page);
        dest.writeInt(this.size);
        dest.writeInt(this.total);
        dest.writeList(this.list);
    }

    public GoodsSelectLabelBean() {
    }

    protected GoodsSelectLabelBean(Parcel in) {
        this.page = in.readInt();
        this.size = in.readInt();
        this.total = in.readInt();
        this.list = new ArrayList<ListBean>();
        in.readList(this.list, ListBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<GoodsSelectLabelBean> CREATOR = new Parcelable.Creator<GoodsSelectLabelBean>() {
        @Override
        public GoodsSelectLabelBean createFromParcel(Parcel source) {
            return new GoodsSelectLabelBean(source);
        }

        @Override
        public GoodsSelectLabelBean[] newArray(int size) {
            return new GoodsSelectLabelBean[size];
        }
    };
}
